package com.xbk.seckill.stock.application.model.command;

import lombok.Data;

import java.io.Serializable;

/**
 * 库存Command
 *
 * @author xiexu
 * @date 2025/3/8 22:02
 */
@Data
public class SeckillStockBucketCommand implements Serializable {

    private static final long serialVersionUID = 5541107936872329915L;

    /**
     * 总库存
     */
    private Integer totalStock;

    /**
     * 分桶数量
     */
    private Integer bucketsQuantity;

    /**
     * 分桶编排模式, 1:总量模式  2：增量模式
     */
    private Integer arrangementMode;

    public boolean isEmpty() {
        return this.totalStock == null
                || this.bucketsQuantity == null
                || this.arrangementMode == null;
    }

}
